Skip to content

Conversation

@valeriupredoi
Copy link
Contributor

@valeriupredoi valeriupredoi commented Apr 15, 2025

Description

Investigations done in
#2706
our builds suffering from this issue sphinx-doc/sphinx#11739 - no idea why it's reared its head only now, and why it's not manifesting itself in ESMValTool

Docs: https://esmvaltool--2708.org.readthedocs.build/projects/ESMValCore/en/2708/

Closes #2705 #2706


Before you get started

Checklist

It is the responsibility of the author to make sure the pull request is ready to review. The icons indicate whether the item will be subject to the 🛠 Technical or 🧪 Scientific review.


To help with the number pull requests:

@valeriupredoi valeriupredoi added documentation Improvements or additions to documentation testing labels Apr 15, 2025
@codecov
Copy link

codecov bot commented Apr 15, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 95.10%. Comparing base (e2f4d60) to head (494119f).
⚠️ Report is 61 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2708      +/-   ##
==========================================
- Coverage   95.11%   95.10%   -0.01%     
==========================================
  Files         258      258              
  Lines       15028    15028              
==========================================
- Hits        14294    14293       -1     
- Misses        734      735       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@valeriupredoi
Copy link
Contributor Author

valeriupredoi commented Apr 15, 2025

this is unfortunately not the solution

setting it to LC_ALL=C looks to be doing the part

@valeriupredoi valeriupredoi deleted the force_setlocale_build_docs branch April 15, 2025 13:25
@valeriupredoi valeriupredoi restored the force_setlocale_build_docs branch April 15, 2025 16:14
@valeriupredoi valeriupredoi reopened this Apr 15, 2025
@bouweandela
Copy link
Member

Yes, I would have been surprised if python -m locale actually changed the locale settings. It's just supposed to list them.

@bouweandela bouweandela mentioned this pull request May 7, 2025
6 tasks
@valeriupredoi
Copy link
Contributor Author

well, here goes me then - I reset all the bits like it used to be before I left for EGU (when it was passing many times in a row), and now it fails - it's like the locale gets stuck in a state where once stuck it's hard to dislodge afterwards. Am out of bullets, but I really don't want us to pin to exclude the latest Python 3.13.3 unless we know for sure that version messes up the locale

@valeriupredoi
Copy link
Contributor Author

valeriupredoi commented May 7, 2025

@bouweandela @schlunma I think this finally does it for RTD: 3 green runs in a row! Make that 4 greens in a row - smells like an actual fix 🥳 BTW Bouwe, I've seen issues reported for Python 3.13 and locale - they deprecated funcs like getdefaultlocale() and those things are breaking some stuff

@valeriupredoi
Copy link
Contributor Author

whoa 6 greens in a row! Dis solution, kolega 🥳

@bouweandela
Copy link
Member

But you said two weeks ago that it worked with just setting language=en without the locale setting. Are the new changes even needed? #2708 (comment)

@bouweandela
Copy link
Member

I would be really keen to understand what is going on here, so we can actually fix the issue in cf_units (if it turns out that that is the problem)

@valeriupredoi
Copy link
Contributor Author

I would be really keen to understand what is going on here, so we can actually fix the issue in cf_units (if it turns out that that is the problem)

absolutely! I propose we merge this to have an ad-hoc fix so our tests pass, then I will start looking into the real cause; - I'll start by isolating the issue to cf_units (which I'm not even 100% is the issue) 🍺

@valeriupredoi
Copy link
Contributor Author

have kicked off (more) investigations in #2706

@valeriupredoi
Copy link
Contributor Author

valeriupredoi commented May 9, 2025

@bouweandela I think I finally cracked it! And by the looks of it, it's neither iris nor cf-units, nor any combination of - see #2706 (comment) - it's just Python: 3.13.3 changes the locale to ('en_US', 'UTF-8') which is not liked at all by sphinx, whereas 3.12.2 has that to ('C', 'UTF-8') which is always liked by sphinx. So this is why the fix in this PR will always work since it reverts the Python locale to something that 3.13.2 had and had no issues with it. Why 3.13.3 changes that to that and why that is not liked by sphinx is completely beyond me, but I can 100% sure say this is the fix we need, or pin to Python (but am not keen on that)

Copy link
Member

@bouweandela bouweandela left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@bouweandela bouweandela merged commit c2268dd into main May 13, 2025
7 checks passed
@bouweandela bouweandela deleted the force_setlocale_build_docs branch May 13, 2025 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Build on readthedocs failing

2 participants